home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 42 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.mel.aone.net.au!usenet
  2. From: clyde@hitech.com.au (Clyde Smith-Stubbs)
  3. Newsgroups: comp.lang.c,comp.lang.c++
  4. Subject: Re: Poor floating point code in BC++
  5. Date: Tue, 02 Jan 1996 04:48:12 GMT
  6. Organization: HI-TECH Software
  7. Message-ID: <30e8b8c4.1015833152@news.bne.aone.net.au>
  8. References: <4c9sja$gke$1@mhafc.production.compuserve.com>
  9. Reply-To: clyde@hitech.com.au
  10. NNTP-Posting-Host: skyhawk.hitech.com.au
  11. X-Newsreader: Forte Agent .99c/16.141
  12.  
  13. On 2 Jan 1996 00:00:42 GMT, Dave Hand <70621.3624@CompuServe.COM>
  14. wrote:
  15.  
  16. >would very much like to know if other compilers do a better job (or
  17. >set me straight as to why the above code makes sense).   
  18.  
  19. Hmm, this is what HI-TECH C generates (using in-line 8087 code):
  20.  
  21. ;f.c: 8: n = (int)x;
  22.         fld     -8[bp], qword
  23.         fistp   -26[bp], word
  24. ;f.c: 9: z = x * y;
  25.         fld     -8[bp], qword
  26.         fmul    -16[bp], qword
  27.         fstp    -24[bp], qword
  28.  
  29.  
  30.  
  31.  Clyde Smith-Stubbs       | HI-TECH Software,       | Voice: +61 7 3300 5011
  32.  clyde@hitech.com.au      | P.O. Box 103, Alderley, | Fax:   +61 7 3300 5246
  33. http://www.hitech.com.au  | QLD, 4051, AUSTRALIA.   | BBS:   +61 7 3300 5235
  34. ----------------------------------------------------------------------------
  35. FREE! Download our shareware (FREE for noncommercial use) MS-DOS C Compiler!
  36.              Point your Web browser at http://www.hitech.com.au/
  37.